﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>倒计时显示</title>
    <script type="text/javascript">
        var deadline = new Date("08/08/2026");
        var symbol="2026年8月8日";
        var now = new Date();
        var leave = deadline.getTime() - now.getTime();
        var day = Math.floor(leave / (1000 * 60 * 60 * 24));
        if(day > 0){
            document.write("今天离"+ symbol + "还有"+ day + "天");
        }else if(day === 0){
            document.write("只剩下最后一天");
        }else{
            document.write("已经超过了所定时间");
        }
        
    </script>
</head>
<body>

</body>
</html>